package com.fpj.sat.vehicle_administrator.comun;



import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.xml.DOMConfigurator;

public class Log4jInit {

	
	private String log4jLocation;
	
	public void inicializa() {
		System.out.println("Inicia Log4jInit...");
		System.out.println("log4jLocation: " + log4jLocation);
		if (log4jLocation.trim().endsWith("xml")) {
			DOMConfigurator.configure(log4jLocation);
			return;
		}
		if (log4jLocation.trim().endsWith("properties")) {
			PropertyConfigurator.configure(log4jLocation);
			return;
		}
	}


	public void setLog4jLocation(String log4jLocation) {
		this.log4jLocation = log4jLocation;
	}
	
}